<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <p>
        {{count}}	
        </p>
        <button @click="fun(1,$event)">
            button one
        </button>	
        <button @click="fun(2)">2</button>
        <button @click="fun(3)">3</button>
        <button @click="fun(4)">4</button>
    </div>

    <script src="vue.js"></script>
    <script>
        new Vue({
            // 作用域绑定
            el:"#app",
            // 数据存放
            data:function(){
                return {
                    count:0,
                }
            },
            // 方法存放
            methods:{
                fun(num,event){
                    console.log(num,event);
                    this.count+=num;
                }
            },
            // 计算属性
            computed:{

            },
            // 侦听器
            watch:{

            }
        })
    </script>
</body>
</html>